var authList;
$(function(){
	if($("#authList").length>0){
        authList = $.fn.bsgrid.init('authList', {
            url:'../../testApi/userList.php',               //数据地址
            pageSizeSelect: true,
            pageSize: 10,
            stripeRows: true,
            displayBlankRows: false
        });
    }
})
var auth={
    operate:function(record, rowIndex, colIndex, options) {
        var id=authList.getRecordIndexValue(record, 'id')
        var operate='<a href="shopAuth.html?id=' + id + '">审核</a> ';
        return operate;
    }
}
//审核商家
$("#shopAuth").validate({
    rules:{
        auth:{required:true}
    }
})

$(document).on("change","input[name='auth']",function(){
    var reason=$("#reason").parent().parent();
    var val=$(this).val();
    if(val==0) reason.css("display","block")
    else if(val==1) reason.css("display","none")
})  